﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using Microsoft.Win32;
using System.Windows.Forms;

namespace HealthCenter
{
    class GlobalInfo
    {

        private static WebClient client;
        public static WebClient Client
        {
            get
            {
                if (client == null)
                {
                    client = new WebClient();

                    ProxyConfigure cfg = SystemConfigForm.GetConfig();
                    if (cfg.ProxyEnabled.Value)
                    {
                        WebProxy proxyObject = new WebProxy(cfg.Host, true, null, CredentialCache.DefaultNetworkCredentials);
                        Client.Proxy = proxyObject;
                    }
                }
                return client;
            }
        }
        public static string cookie;
        public const string ReportsXmlPath = "selectedReports.xml";

        //public const string CheckCodeUrl = "http://10.140.243.116:8002/CheckCode.aspx";
        //public const string ProxyServiceUrl = "http://10.140.243.116:8002/MecReportProxyService.asmx";
        //public const string NationalSearchServiceUrl = "http://10.140.75.151:8001/ws/rxd_national.asmx";

        public const string CheckCodeUrl = "http://jsw2.xh.sh.cn/ProxyForScars/CheckCode.aspx";
        public const string ProxyServiceUrl = "http://jsw2.xh.sh.cn/ProxyForScars/MecReportProxyService.asmx";
        public const string NationalSearchServiceUrl = "http://jsw2.xh.sh.cn/ws/RXD_National.asmx";
    }
}
